//导入vue-router
import { createRouter, createWebHistory } from 'vue-router'
//导入组件
import LoginVue from '@/views/Login.vue'
import LayoutVue from '@/views/Layout.vue'

import DormitoryCategoryVue from '@/views/dormitory/DormitoryCategory.vue'
import DormitoryManageVue from '@/views/dormitory/DormitoryManage.vue'
import EmpAvatarVue from '@/views/emp/EmpAvatar.vue'
import EmpInfoVue from '@/views/emp/EmpInfo.vue'
import EmpResetPasswordVue from '@/views/emp/EmpResetPassword.vue'
import UserManageVue from '@/views/user/UserManage.vue'
import StuVue from '@/views/stu.vue'
import StuCategoryVue from '@/views/StuCategory.vue'
import StuDormitoryVue from '@/views/StuDormitory.vue'
import StuDormitoryDoubleQuadrupleRoomVue from '@/views/StuDormitoryDoubleQuadrupleRoom.vue'
import StuDormitoryByShuangChuangShuangRenVue from '@/views/StuDormitoryByShuangChuangShuangRen.vue'
import StuDormitoryByQiYiSiRenVue from '@/views/StuDormitoryByQiYiSiRen.vue'
import StuDormitoryByYaoLinYaoSiRenVue from '@/views/StuDormitoryByYaoLinYaoSiRen.vue'
import StuDormitoryByShiJiuSiRenVue from '@/views/StuDormitoryByShiJiuSiRen.vue'
import DormitoryStuVue from '@/views/showDormitory/DormitoryStu.vue'
import StuInfoVue from '@/views/showStuInfo/StuInfo.vue'
const routes = [
    {
        path: '/login',
        component: LoginVue
    },
    {
        path:'/stu',
        component:StuVue
    },
    {
        path:'/stu/category',
        component:StuCategoryVue
    },
    {
        path:'/stu/dormitory',
        component:StuDormitoryVue
    },
    {
        path:'/stu/dormitory/doubleQuadrupleRoom',
        component:StuDormitoryDoubleQuadrupleRoomVue
    },
    {
        path:'/stu/dormitory/ShuangChuangShuangRen',
        component:StuDormitoryByShuangChuangShuangRenVue
    },
    {
        path:'/stu/dormitory/QiYiSiRen',
        component:StuDormitoryByQiYiSiRenVue
    },
    {
        path:'/stu/dormitory/YaoLinYaoSiRen',
        component:StuDormitoryByYaoLinYaoSiRenVue
    },
    {
        path:'/stu/dormitory/ShiJiuSiRen',
        component:StuDormitoryByShiJiuSiRenVue
    },

    {
        path:'/show/dormitory/stu',
        component:DormitoryStuVue
    },
    {
        path:'/Stu/Info',
        component: StuInfoVue
    },

    {
        path: '/',
        component: LayoutVue,
        redirect: '/dormitory/manage',
        children: [
            {
                path: '/emp/empInfo',
                component: EmpInfoVue
            },
            {
                path: 'emp/updateAvatar',
                component: EmpAvatarVue
            },
            {
                path: 'emp/updatePwd',
                component: EmpResetPasswordVue
            },
            {
                path:'dormitory/category',
                component:DormitoryCategoryVue
            },
            {
                path:'dormitory/manage',
                component:DormitoryManageVue
            },
            {
                path:'user/manage',
                component:UserManageVue
            }
        ]
    },
]

//创建路由器
const router = createRouter({
    history: createWebHistory(),
    routes: routes
});

export default router;


